# Create your views here.

from django.shortcuts import render_to_response
from django.http import HttpRequest
from sessiondata.search import search_sessiondata

def search(request):
    queryexp = request.GET.get("queryexp", "").strip()
    oquery = request.GET.get("oquery" ,"").strip()
    query = request.GET.get("query", "").strip()
    
    result = search_sessiondata(queryexp, oquery, query)

    result['params'] = {
        'queryexp': queryexp,
        'oquery': oquery,
        'query': query,
    }
    #print result
    return render_to_response('search.html', result)
